package com.chigga.common.core.domain;

import com.baomidou.mybatisplus.core.metadata.OrderItem;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Positive;
import lombok.Data;

import java.util.List;

/**
 * 基础查询实体
 * @author DefChigga
 */
@Data
public class BasePageQuery {
    /**
     * 当前页码
     */
    @Schema(description = "当前页码", example = "1")
    @Positive(message = "当前页码必须为正数")
    private Integer pageNum = 1;

    /**
     * 每页条数
     */
    @Schema(description = "每页条数", example = "10")
    @Positive(message = "每页条数必须为正数")
    private Integer pageSize = 10;

    /**
     * 排序参数
     */
    @Schema(description = "排序参数列表（排序参数对象：column为排序字段，多个单词用下划线分隔，asc为是否升序，布尔类型）")
    private List<OrderItem> orders;
}
